public class Example5_3 {
  public static void main(String args[]) {
     CheapGoods cheapGoods=new CheapGoods();
     //cheapGoods.weight=198.98; ÊÇ·Ç·¨µÄ£¬ÒòÎª×ÓÀà¶ÔÏóµÄweightÒÑ¾­ÊÇintÐÍ
     cheapGoods.newSetWeight(198);
     System.out.println("¶ÔÏócheapGoodsµÄweightµÄÖµÊÇ:"+cheapGoods.weight);
     System.out.println("cheapGoodsÓÃ×ÓÀàÐÂÔöµÄÓÅ»Ý·½·¨¼ÆËã¼Û¸ñ£º"+
                         cheapGoods.newGetPrice());
     cheapGoods.oldSetWeight(198.987); //×ÓÀà¶ÔÏóµ÷ÓÃ¼Ì³ÐµÄ·½·¨²Ù×÷Òþ²ØµÄdoubleÐÍ±äÁ¿weight
     System.out.println("cheapGoodsÊ¹ÓÃ¼Ì³ÐµÄ·½·¨£¨ÎÞÓÅ»Ý£©¼ÆËã¼Û¸ñ£º"+
                          cheapGoods.oldGetPrice());
  }  
}

